import { Vector3 } from 'three'
import { Point2D } from './Point2D'

export class Point3D extends Vector3 {
  constructor(x: number, y: number, z: number) {
    super(x, y, z)
  }

  static convert2DTo3D(p2: Point2D): Point3D {
    return new Point3D(p2.x, 0, -p2.y)
  }

  static convert3DTo2D(p3: Point3D): Point2D {
    return new Point2D(p3.x, -p3.z)
  }
}
